const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('../../views/Home.vue'),
    meta: {
      required: true,
      role: ['admin','user']
    }
  },
  {
    path: '/workerInfo',
    name: 'WorkerInfo',
    component: () => import('../../views/WorkerInfo'),
    meta: {
      required: true,
      role: ['admin']
    }
  },
  {
    path: '/changeMyInfo',
    name: 'ChangeMyInfo',
    component: () => import('../../views/changeMyInfo'),
    beforeRouteEnter(to,from,next) {
      // console.log(to,from)
      console.log(to.fullPath)
      next()
    }
  }
];
export default routes;